-
-
Notifications
You must be signed in to change notification settings - Fork 636
fix(pypi): make the URL/filename extraction from requirement more robust #2871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rickeylev
merged 4 commits into
bazel-contrib:main
from
aignas:fix/2363/improve-url-parsing
May 12, 2025
Merged
fix(pypi): make the URL/filename extraction from requirement more robust #2871
rickeylev
merged 4 commits into
bazel-contrib:main
from
aignas:fix/2363/improve-url-parsing
May 12, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: - Make the requirement line the same as the one that is used in whls. It only contains extras and the version if it is present. - Add debug log statements if we fail to get the version from a direct URL reference. - Move some tests from `parse_requirements_tests` to `index_sources_tests` to improve test maintenance. - Replace the URL encoded `+` to a regular `+` in the filename. - Correctly handle the case when the `=sha256:` is used in the URL. I cannot think of anything else that we can do for this as of now, so will mark the associated issue as resolved. Fixes bazel-contrib#2363
rickeylev
approved these changes
May 12, 2025
aignas
added a commit
to aignas/rules_python
that referenced
this pull request
Jul 22, 2025
This fixes the subtle bug introduced in bazel-contrib#2871, where we were dropping the URL from the requirement, because we can download the sdist directly. We cannot add `--no-index` because sdists in general may require extra build dependencies and we had already issues previously (see 0.36 release notes). Fixes bazel-contrib#2363
aignas
added a commit
to aignas/rules_python
that referenced
this pull request
Aug 3, 2025
This fixes the subtle bug introduced in bazel-contrib#2871, where we were dropping the URL from the requirement, because we can download the sdist directly. We cannot add `--no-index` because sdists in general may require extra build dependencies and we had already issues previously (see 0.36 release notes). Fixes bazel-contrib#2363
aignas
added a commit
to aignas/rules_python
that referenced
this pull request
Aug 3, 2025
This fixes the subtle bug introduced in bazel-contrib#2871, where we were dropping the URL from the requirement, because we can download the sdist directly. We cannot add `--no-index` because sdists in general may require extra build dependencies and we had already issues previously (see 0.36 release notes). Fixes bazel-contrib#2363
aignas
added a commit
to aignas/rules_python
that referenced
this pull request
Aug 9, 2025
This fixes the subtle bug introduced in bazel-contrib#2871, where we were dropping the URL from the requirement, because we can download the sdist directly. We cannot add `--no-index` because sdists in general may require extra build dependencies and we had already issues previously (see 0.36 release notes). Fixes bazel-contrib#2363
github-merge-queue bot
pushed a commit
that referenced
this pull request
Aug 11, 2025
…3115) This fixes the subtle bug introduced in #2871, where we were dropping the URL from the requirement, because we can download the sdist directly. We cannot add --no-index because sdists in general may require extra build dependencies and we had already issues previously (see 0.36 release notes). Fixes #2363 Fixes #3131 --------- Co-authored-by: Richard Levasseur <[email protected]>
aignas
added a commit
that referenced
this pull request
Aug 11, 2025
…3115) This fixes the subtle bug introduced in #2871, where we were dropping the URL from the requirement, because we can download the sdist directly. We cannot add --no-index because sdists in general may require extra build dependencies and we had already issues previously (see 0.36 release notes). Fixes #2363 Fixes #3131 --------- Co-authored-by: Richard Levasseur <[email protected]> (cherry picked from commit f6dd386) Cherry-pick notes: adapted the changelog to mention 1.5.2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
only contains extras and the version if it is present.
URL reference.
parse_requirements_teststoindex_sources_teststo improve testmaintenance.
+to a regular+in the filename.=sha256:is used in the URL.Once this is merged I plan to tackle #2648 by changing the
parse_requirementscode to de-duplicate entries returnedby the
parse_requirementsfunction.I cannot think of anything else that we can do for this as of now, so
will mark the associated issue as resolved.
Fixes #2363
Work towards #2648